import { S } from '../../s';
import { IPSAppCounterRef } from '../../app/control/ipsapp-counter-ref';
import { IPSDETabViewPanel } from './ipsdetab-view-panel';
import { PSDEViewPanelImpl } from './psdeview-panel-impl';
import { IPSDERBase } from '../../dataentity/der/ipsderbase';
import { IPSDEOPPriv } from '../../dataentity/priv/ipsdeoppriv';
import { IPSSysImage } from '../../res/ipssys-image';

export class PSDETabViewPanelImpl
  extends PSDEViewPanelImpl
  implements IPSDETabViewPanel
{
  get counterId(): string {
    return this.M.counterId;
  }

  get navFilter(): string {
    return this.M.navFilter;
  }

  protected navpsder: IPSDERBase;
  getNavPSDER(): IPSDERBase | null {
    return (
      this.navpsder ||
      (this.navpsder = this.fillObjectModel(
        S._272,
        this.M.getNavPSDER,
        S._309,
      ) as IPSDERBase)
    );
  }

  protected psappcounterref: IPSAppCounterRef;
  getPSAppCounterRef(): IPSAppCounterRef | null {
    return (
      this.psappcounterref ||
      (this.psappcounterref = this.fillObjectModel(
        S._9d,
        this.M.getPSAppCounterRef,
        S._2a9,
      ) as IPSAppCounterRef)
    );
  }

  protected psdeoppriv: IPSDEOPPriv;
  getPSDEOPPriv(): IPSDEOPPriv | null {
    return (
      this.psdeoppriv ||
      (this.psdeoppriv = this.fillObjectModel(
        S._270,
        this.M.getPSDEOPPriv,
        S._2a6,
      ) as IPSDEOPPriv)
    );
  }

  protected pssysimage: IPSSysImage;
  getPSSysImage(): IPSSysImage | null {
    return (
      this.pssysimage ||
      (this.pssysimage = this.fillObjectModel(
        S._27b,
        this.M.getPSSysImage,
        S._2ad,
      ) as IPSSysImage)
    );
  }

  get parentDataJO(): IModel {
    return this.M.parentDataJO;
  }
  get cls(): string {
    return 'PSDETabViewPanelImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._269 || cls == S._26a) return true;
    return super.instanceof(cls);
  }
}
